derivative of an expression then simplifying